package com.scy.java.object.Extends;
//人类
public class ManKind {
    private int sex;//1表示男 0表示女
    private int sal;//工资
    public ManKind(){
        //无参构造器
        System.out.println("我是父类的无参构造器");
    }
//  全参构造器
    public ManKind(int sex, int sal) {
        this.sex = sex;
        this.sal = sal;
    }
    //查看有没有工作
    public void employeed(){
        if (sal == 0){
            System.out.println("不上班");
        }else{
            System.out.println("上班");
        }
    }
    //查看男女
    public void manorWoman(){
        if (sex ==1){
            System.out.println("男");
        } else if (sex ==0) {
            System.out.println("女");
        }
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getSal() {
        return sal;
    }

    public void setSal(int sal) {
        this.sal = sal;
    }
}
